// FlowChartSoftwareView.h : interface of the CFlowChartSoftwareView class
//


#pragma once


class CFlowChartSoftwareView : public CScrollView
{
protected: // create from serialization only
	CFlowChartSoftwareView();
	DECLARE_DYNCREATE(CFlowChartSoftwareView)

// Attributes
public:
	CFlowChartSoftwareDoc* GetDocument() const;

// Operations
public:

// Overrides
public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);

// Implementation
public:
	virtual ~CFlowChartSoftwareView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnCreateRect();
	afx_msg void OnCreateText();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	virtual void OnInitialUpdate();
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
protected:
	virtual void OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/);
public:
	afx_msg void OnCreateArrow();
	afx_msg void OnCreateDiamond();
	afx_msg void OnShowgrid();	
	afx_msg void OnResizeBig();	
	afx_msg void OnResizeSmall();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnGridSetting();
	afx_msg void OnEditUndo();
	afx_msg void OnRedo();
	

	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);

	afx_msg void OnUpdateShowgrid(CCmdUI *pCmdUI);
	afx_msg void OnUpdateCreateRect(CCmdUI *pCmdUI);
	afx_msg void OnUpdateCreateArrow(CCmdUI *pCmdUI);
	afx_msg void OnUpdateCreateDiamond(CCmdUI *pCmdUI);

	afx_msg void OnFileOpen();
	afx_msg void OnFileNew();
	afx_msg void OnFileSave();
	afx_msg void OnFileSaveAs();
};

#ifndef _DEBUG  // debug version in FlowChartSoftwareView.cpp
inline CFlowChartSoftwareDoc* CFlowChartSoftwareView::GetDocument() const
   { return reinterpret_cast<CFlowChartSoftwareDoc*>(m_pDocument); }
#endif

